Re-vendor api.proto (201 -> 236 RPCs) and update testkit stubs - #1
Merged
Conversation
The vendored `api.proto` in both crates was a byte-exact copy of the upstream client proto from 2026-06-03 (modal @ cc549d52c5) — 88 upstream commits stale, +543/-12 lines. Additive: 35 new RPCs on `service ModalClient` (Webhook token family, Image tags/publish, Sandbox V2 name/tags/list/restore/exit-snapshot, Environment roles/budget, billing summaries, …), 201 -> 236. Breaking, and why each is handled: - `AppRollback` returns `AppRollbackResponse`, no longer `google.protobuf.Empty` — stub signature corrected. - 35 new RPCs leave `MockServicer`'s `impl ModalClient` incomplete — one `mock_unimplemented!` arm added per RPC, merged into the sorted block. - `FunctionGetInputsRequest.max_values`/`average_call_time` are now `reserved`, `SandboxGetCommandRouterAccessRequest.sandbox_id` moved into a `oneof target`, and `Sandbox.experimental_options` is `[deprecated]` (superseded by `experimental_options_v2`). No call site touches any of them; the SDK's `max_values` is `FunctionGetOutputsRequest`'s, which is unchanged. Coverage reconciles exactly: 192 unary + 11 stream stubs + 33 hand-written = 236 = the RPC count in the proto, with no colliding method names. `proto/SOURCE.toml` records the upstream revision and the re-vendoring steps. The source is `modal-labs/modal-client` (the public Python-client mirror), whose `modal_proto/api.proto` is byte-identical to the private monorepo's copy — so re-vendoring needs no credentials. The PyPI `modal` wheel is not usable for this: 1.5.3 ships `api_pb2.py` but no `.proto`. `modal-rust-testkit` is `publish = false`, so the published surface change is only `modal-rust-sdk`'s regenerated tonic client. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ined environment_type The re-vendored proto added `environment_type` to `EnvironmentMetadata`; the hand-written stub built it with an exhaustive struct literal (E0063). Fill the new field via `..Default::default()` so future additive fields don't break this stub again. Verified locally on the pinned 1.96.0 toolchain: cargo fmt --check, clippy --all-targets -D warnings, clippy -p modal-rust -p modal-rust-macros, cargo test (default-members), and cargo test -p modal-rust-testkit -p modal-rust-sdk (188 tests) — all green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Re-syncs the vendored
api.protoinmodal-rust-sdkandmodal-rust-testkitwith upstream (modal-labs/modal-client@1d53eec296, 2026-08-07). The previous copy dated to 2026-06-03 — 88 upstream commits stale (+543/−12 lines).Changes
proto/api.protocopies: byte-exact re-vendor; testkit copy keeps its one-line "keep in sync" header.mock_unimplemented!arm inservicer.rs.AppRollbacknow returnsAppRollbackResponse(wasEmpty) — stub signature corrected.environment_get_or_createstub:EnvironmentMetadatagainedenvironment_type; fill via..Default::default()so additive fields don't break it again.proto/SOURCE.toml(new): upstream repo/path/commit provenance + re-vendoring steps.Breaking upstream field changes with no call sites here (verified):
FunctionGetInputsRequest.max_values/average_call_time→reserved,SandboxGetCommandRouterAccessRequest.sandbox_id→oneof target,Sandbox.experimental_options→[deprecated].modal-rust-testkitispublish = false, so the published surface change is onlymodal-rust-sdk's regenerated tonic client.Verification (local, pinned 1.96.0)
cargo fmt --check/git diff --checkcargo clippy --all-targets -- -D warnings+ light-facade clippycargo test(default-members) andcargo test -p modal-rust-testkit -p modal-rust-sdk— 188 passed, 0 failed🤖 Generated with Claude Code